.wos-folder {
  width: 100%;
  height: 100%;
  overflow: hidden;
  text-shadow: none;

  .side-left {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    height: 100%;
    overflow: hidden;

    .content {
      position: relative;
      display: flex;
      flex: 1;
      flex-direction: column;
      gap: 8px;
      width: 100%;
      height: 100%;
      overflow: hidden;
      color: var(--el-text-color-regular);

      &:hover {
        overflow: auto;
      }

      .folder-custom-tree {
        width: 100% !important;
        overflow: visible !important;
        color: #353439 !important;
        background: var(--wos-box-left-bg) !important;

        .el-tree-node__content {
          display: inline-flex !important;
          width: 100% !important;
          min-width: max-content;
          padding-right: 24px;
        }

        .el-tree-node {
          > .el-tree-node__children {
            width: 100% !important;
            min-width: max-content;
            overflow: visible !important;
          }
        }

        /* 关闭展开收起动画 */
        .el-collapse-transition-enter-active,
        .el-collapse-transition-leave-active {
          transition: none;
        }

        .custom-tree-node {
          display: flex;
          align-items: center;
          color: var(--el-text-color-regular);

          svg {
            color: var(--wos-folder-color) !important;
          }
        }
      }
    }

    .footer {
      padding: 0 16px 8px;
      font-size: 12px;
      justify-content: flex-start;
    }
  }

  .content-right {
    flex: 1;
    flex-direction: column;
    padding: 8px;
    text-shadow: none;

    .toolbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding-bottom: 8px;
      font-size: 12px;
      border-bottom: solid 1px var(--wos-border-color);

      &-left {
        display: flex;
        flex: 1;
        gap: 8px;
        color: var(--wos-icon-item-color);

        .item {
          display: flex;
          align-items: center;
          justify-content: center;
          padding: 2px 8px;
          cursor: pointer;

          &:hover {
            color: var(--wos-icon-item-hover-color);
            background-color: var(--wos-icon-item-bg);
            border-radius: var(--radius);
          }
        }

        .dropdown-item {
          display: flex;
          gap: 6px;
          align-items: center;

          .caret {
            color: var(--wos-icon-item-color);

            &:hover {
              color: var(--wos-icon-item-hover-color);
            }
          }
        }
      }

      &-right {
        display: flex;
        gap: 8px;
      }
    }

    .content {
      flex: 1;
      height: 100%;
      overflow: auto;
      color: var(--el-text-color-regular);
      background-color: var(--wos-box-center-bg);

      .header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 8px;
        font-size: 12px;
        border-bottom: solid 1px var(--wos-border-color);

        &-right {
          .toggle-env {
            display: flex;
            gap: 8px;
            align-items: center;
            cursor: pointer;
          }
        }
      }

      .layout-list {
        height: 100%;
        overflow: auto;

        .hor-minimalist-b {
          width: 100%;
          font-size: 12px;
          text-align: left;
          border-collapse: collapse;
          background-color: var(--el-table-bg-color);

          th {
            position: sticky;
            top: 0;
            z-index: 2;
            height: 28px;
            padding: 4px 6px;
            font-size: 14px;
            font-weight: 700;
            line-height: 28px;
            background-color: var(--el-table-header-bg-color);
            border-bottom: 1px solid var(--wos-box-border-color);

            &.sort {
              cursor: pointer;

              .th {
                position: relative;
                width: 100%;
                height: 100%;

                svg {
                  position: absolute;
                  top: -6px;
                  left: calc(50% - 8px);
                  color: var(--el-color-info);
                }
              }
            }
          }

          tr {
            background-color: var(--el-table-tr-bg-color);

            &:nth-child(even) {
              background-color: var(--el-fill-color-lighter);
            }
          }

          td {
            padding: 4px 6px;
            color: var(--el-text-color-regular);
            border-bottom: 1px solid var(--wos-border-color);

            &.checkbox {
              text-align: center;
            }

            .title {
              display: flex;
              gap: 2px;
              align-items: center;
              cursor: pointer;

              .name {
                display: -webkit-box;
                width: 100%;
                overflow: hidden;
                text-overflow: ellipsis;
                -webkit-line-clamp: 1;
                -webkit-box-orient: vertical;
              }

              svg {
                width: 1.1rem;
                height: 1.1rem;

                &.folder {
                  color: var(--wos-folder-color);
                }

                &.file {
                  color: var(--el-color-primary-light-3);
                }
              }
            }

            .action {
              display: flex;
              gap: 8px;
              align-items: center;

              .el-button.btn-remark {
                width: 100px;

                span {
                  display: block;
                  overflow: hidden;
                  text-overflow: ellipsis;
                  white-space: nowrap;
                }
              }
            }
          }

          tbody {
            height: 100%;
            overflow: hidden;

            &:hover {
              overflow: auto;
            }
          }

          tbody tr:hover {
            background-color: var(--el-table-row-hover-bg-color);

            td {
              color: var(--wos-folder-hover-color);

              .name {
                svg {
                  color: var(--wos-folder-hover-color);
                }
              }
            }
          }
        }
      }

      .layout-empty-grid {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100%;
        background-color: var(--el-table-bg-color);
      }

      .layout-grid {
        display: grid;
        grid-gap: 8px;
        justify-content: space-between;
        min-height: 0;
        padding: 8px;
        overflow: auto;

        .grid-item {
          position: relative;
          display: flex;
          flex-direction: column;
          gap: 8px;
          align-items: center;
          height: fit-content;
          padding: 8px;
          font-size: 12px;
          cursor: pointer;
          border: 1px solid transparent;
          border-radius: var(--radius);

          svg {
            &.folder {
              color: var(--wos-folder-color);
            }

            &.file {
              color: #fff;
            }
          }

          .name {
            display: -webkit-box;
            width: 100%;
            overflow: hidden; //超出的文本隐藏
            line-height: 18px;
            text-align: center;
            text-overflow: ellipsis;
            -webkit-line-clamp: 3; // 设置从第几行后开始省略
            cursor: pointer;
            -webkit-box-orient: vertical;
          }

          &:hover {
            background-color: rgb(0 0 0 / 12%);

            svg,
            .name {
              color: var(--wos-icon-item-hover-color);
            }
          }

          &.checked {
            background-color: rgb(0 0 0 / 5%);
            border: 1px dashed var(--wos-border-color);

            &::after {
              position: absolute;
              top: 4px;
              left: 4px;
              z-index: 2;
              width: 20px;
              height: 20px;
              font-family: iconfont-wos !important;
              font-size: 16px;
              font-style: normal;
              color: #059be1;
              content: '\e80b';
              background-size: cover;
              -webkit-font-smoothing: antialiased;
              -moz-osx-font-smoothing: grayscale;
            }

            svg,
            .name {
              color: #059be1;
            }
          }
        }

        &.small {
          grid-template-columns: repeat(auto-fill, 96px);

          .grid-item {
            width: 96px;

            svg {
              width: 3rem;
              height: 3rem;
            }
          }
        }

        &.middle {
          grid-template-columns: repeat(auto-fill, 128px);

          .grid-item {
            width: 128px;

            svg {
              width: 5rem;
              height: 5rem;
            }
          }
        }

        &.large {
          grid-template-columns: repeat(auto-fill, 168px);

          .grid-item {
            width: 160px;

            svg {
              width: 7rem;
              height: 7rem;
            }
          }
        }

        &::after {
          flex: 1;
          content: '';
        }
      }
    }

    .breadcrumb {
      display: flex;
      align-items: center;
      height: 36px;
      margin-top: 2px;
      overflow: hidden;
      font-size: 12px;

      &-item {
        position: relative;
        display: flex;
        gap: 4px;
        align-items: center;
        justify-content: center;
        height: 24px;
        padding: 0 8px 0 4px;
        padding-left: 8px;
        margin-right: 16px;
        line-height: 24px;
        color: var(--el-text-color-regular);
        text-align: center;
        text-decoration: none;
        cursor: pointer;
        background-color: var(--wos-breadcrumb-bg-color);

        span {
          display: block;
          min-width: 48px;
          max-width: 160px;
          overflow: hidden;
          text-overflow: ellipsis;
          white-space: nowrap;
        }

        &:nth-child(even) {
          background-color: var(--wos-breadcrumb-bg-color-2);

          &::before {
            border-color: var(--wos-breadcrumb-bg-color-2);
            border-left-color: transparent;
          }

          &::after {
            border-left-color: var(--wos-breadcrumb-bg-color-2);
          }
        }

        &:first-child {
          border-radius: (4px 0 0 4px);

          &::before {
            border: none;
          }
        }

        &:last-child {
          padding-right: 15px;
          border-radius: (0 4px 4px 0);

          &::after {
            border: none;
          }
        }

        &::before,
        &::after {
          position: absolute;
          top: 0;
          width: 0;
          height: 0;
          content: '';
          border: 0 solid var(--wos-breadcrumb-bg-color);
          border-width: 12px 6px;
        }

        &::before {
          left: -12px;
          border-left-color: transparent;
        }

        &::after {
          left: 100%;
          border-color: transparent;
          border-left-color: var(--wos-breadcrumb-bg-color);
        }

        &:hover {
          color: var(--el-color-primary);
          background-color: var(--el-color-primary-light-7);

          &::before {
            border-color: var(--el-color-primary-light-7);
            border-left-color: transparent;
          }

          &::after {
            border-left-color: var(--el-color-primary-light-7);
          }
        }

        &:active {
          background-color: var(--el-color-primary-light-7);

          &::before {
            border-color: var(--el-color-primary-light-7);
            border-left-color: transparent;
          }

          &::after {
            border-left-color: var(--el-color-primary-light-7);
          }
        }
      }
    }
  }
}
